//
//  ios_BitMapFontManager.h
//  Prism
//
//  Created by Bas du Pre on 24-05-11.
//  Copyright 2011 UU. All rights reserved.
//

#pragma once

#include "../../global.h"
#if PRISM_OS_IOS
#include "../../iOS/ios_global.h"

#include "../../LinkedList.h"

namespace Prism {
namespace Graphics {
    
    class IOS_BitMapFontManager {
    public:
        IOS_BitMapFontManager();
        virtual ~IOS_BitMapFontManager();
        
        static IOS_BitMapFontManager *s_instance;
        
        struct BitMapFont {
            String font;
            List<PFloat> sizes;
        };
        
        NoPObjectList<BitMapFont*> bitMapFonts;
        
    public:
        struct BitMapFontSettings {
            String filename;
            PFloat scale;
        };
        
        static IOS_BitMapFontManager *instance();
        
        void refresh();
        BitMapFontSettings bitMapFontForFontAndSize(String font, PFloat size);
        
    private:
        BitMapFont* addBitMapFont(String font);
        void addBitMapFont(String font, PFloat size);
        
    };
    
    IOS_BitMapFontManager* bitMapFontManager();
    
}
}

#endif